package com.nl.controller.web.mapper;

import com.nl.controller.web.bean.bo.CreateGroupReq;
import com.nl.controller.web.bean.bo.UpdateGroupInfoReq;
import com.nl.controller.web.bean.po.mgrgrouppo.SmsMgrGroupInfo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @desc 项目分组管理
 * @return null
 * @author l
 * @date 2021/9/13 17:03
 */
@Mapper
public interface SmsMgrGroupMapper {

    String getGroupSeq();
    /**
     * @desc 查询项目分组列表
     * @param qryGroupListReq 
     * @return java.util.List<com.nl.controller.web.bean.po.mgrgrouppo.SmsMgrGroupInfo>
     * @author l
     * @date 2021/9/23 15:02
     */
    List<SmsMgrGroupInfo> qryMgrGroupList(@Param(value = "cityId") String cityId, @Param(value = "countyId") String countyId, @Param(value = "groupName") String groupName);

    /**
     * @desc 新增项目分组信息
     * @param createGroupReq
     * @return int
     * @author l
     * @date 2021/9/23 16:27
     */
    int createGroupInfo(CreateGroupReq createGroupReq);
    /**
     * @desc
     * @param createGroupReq
     * @return int
     * @author l
     * @date 2021/9/23 16:51
     */
    int createGroupMgrRel(CreateGroupReq createGroupReq);

    /**
     * @desc 变更项目分组基本信息
     * @param updateGroupInfoReq
     * @return int
     * @author l
     * @date 2021/9/23 18:00
     */
    int updateGroupInfo(UpdateGroupInfoReq updateGroupInfoReq);

    /**
     * @desc 根据分组编码查询分组信息
     * @param groupId
     * @return com.nl.controller.web.bean.po.mgrgrouppo.SmsMgrGroupInfo
     * @author l
     * @date 2021/10/7 20:46
     */
    SmsMgrGroupInfo qryGroupInfoById(@Param(value = "groupId") String groupId);

    /**
     * @desc 根据分组编码查询分组关联项目编码
     * @param groupId
     * @return java.util.List<java.lang.String>
     * @author l
     * @date 2021/10/7 21:40
     */
    List<String> qryRelMgrList(@Param(value = "groupId") String groupId);

    int deleteMgrGroup(@Param(value = "groupId") String groupId, @Param(value = "operatorId") String operatorId);

    int deleteRelMgr(String groupId);

    int deleteMgrGroupRel(@Param(value = "mgrId") String mgrId);

    String findMgrGroupByMgrId(String mgrId);

    int judgeGroupNameRepeat(String groupName);

    int addMgrGroupRel(@Param(value = "groupId") String groupId, @Param(value = "mgrId") String mgrId, @Param(value = "operatorId") String operatorId);
}
